#include <GameObject.hpp>

using namespace Olorin::Framework;

namespace Olorin
{
	GameObject::GameObject() : Object()
	{
		scale = Vector3(1,1,1); //Vector3::One;
	}

	// Mutators
	void GameObject::setScale(const Vector3& scale)
	{
		this->scale = scale;
	}

	// Accessors
	const Vector3& GameObject::getScale() const
	{
		return scale;
	}

	const Matrix4 GameObject::getWorld() const
	{
		Matrix4 result;
		result.scale(getScale());
		result.rotateQuaternion(getRotation());
		result.translate(getPosition());
		return result;
	}
}